<script setup>
import {ref} from "vue"
let condition = ref(true)
</script>

<template>
    <div>
    <h1 v-if="!condition">你看到我说明条件成立了</h1>
    <h1 v-else>你看到我说明你是备胎</h1>
    <h1 v-show="condition">我出不出现都要展示</h1>
    <button @click="condition=!condition">变变变</button>
</div>
</template>

<style scoped>

</style>
